import com.spring.demo.controller.UserController;
import com.spring.demo.entity.Student;
import com.spring.demo.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        // 1.得到 spring 上下⽂
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        // 2.得到 bean
        UserController userController = context.getBean("userController", UserController.class);
        // 3.调⽤ bean ⽅法
        userController.sayHi("1");
    }

}
